## ---------------------------------------------------------------------------------------------------
##
## 		Master file:
##		"Jailed While Presumed Innocent: The Demobilizing Effects of Pretrial Incarceration"
## 
## ---------------------------------------------------------------------------------------------------

sink(file="Jailed_log.txt")

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Main Paper, Figures 1-4
## ---------------------------------------------------------------------------------------------------
source("./01_Main_Paper/Figure_1.R")
source("./01_Main_Paper/Figure_2.R")
source("./01_Main_Paper/Figure_3.R")
source("./01_Main_Paper/Figure_4.R")

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Main Paper, Table 1
## ---------------------------------------------------------------------------------------------------
source("./01_Main_Paper/Table_1.R")

## ---------------------------------------------------------------------------------------------------
## 2. Appendix
## ---------------------------------------------------------------------------------------------------

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Appendix Table G1
## ---------------------------------------------------------------------------------------------------
source("./02_Appendix/Table_G1.R")

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Appendix H, Tables H1 - H3 and Figures H1 - H2
## ---------------------------------------------------------------------------------------------------
source("./02_Appendix/Table_H1.R")
source("./02_Appendix/Table_H2.R")
source("./02_Appendix/Table_H3.R")
source("./02_Appendix/Figure_H1.R")
source("./02_Appendix/Figure_H2.R")

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Appendix I, Tables I1 - I2
## ---------------------------------------------------------------------------------------------------
source("./02_Appendix/Table_I1.R")
source("./02_Appendix/Table_I2.R")

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Appendix J, Table J1
## ---------------------------------------------------------------------------------------------------
source("./02_Appendix/Table_J1.R")

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Appendix K, Table K1
## ---------------------------------------------------------------------------------------------------
sink(file = "Table_K_with_seed2.txt")
source("./02_Appendix/Table_K1.R")
sink()

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Appendix L, Table L1
## ---------------------------------------------------------------------------------------------------
source("./02_Appendix/Table_L1.R")

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Appendix M, Tables M1-M7
## ---------------------------------------------------------------------------------------------------
source("./02_Appendix/Table_M1_row1.R")
source("./02_Appendix/Table_M1_row2.R")
source("./02_Appendix/Table_M1_row3.R")
source("./02_Appendix/Table_M1_row4.R")
source("./02_Appendix/Table_M1_row5.R")
source("./02_Appendix/Table_M2.R")
source("./02_Appendix/Table_M3.R")
source("./02_Appendix/Table_M4.R")
source("./02_Appendix/Table_M5.R")
source("./02_Appendix/Table_M6.R")
source("./02_Appendix/Table_M7.R")

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Appendix N, Table N1
## ---------------------------------------------------------------------------------------------------
source("02_Appendix/Table_N1.R")

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Appendix O, Tables O1 - O4
## ---------------------------------------------------------------------------------------------------
sink(file = "Tables_O_with_seed.txt")
source("./02_Appendix/Table_O1.R")
source("./02_Appendix/Table_O2.R")
source("./02_Appendix/Table_O3.R")
source("./02_Appendix/Table_O4.R")
sink()

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Appendix P, Table P1 
## ---------------------------------------------------------------------------------------------------
source("./02_Appendix/Table_P1.R")

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Appendix Q, Tables Q1 - Q2 
## ---------------------------------------------------------------------------------------------------
source("./02_Appendix/Table_Q1.R")
source("./02_Appendix/Table_Q2.R")

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Appendix R, Table R1
## ---------------------------------------------------------------------------------------------------
source("./02_Appendix/Table_R1.R")

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Appendix S, Table S1
## ---------------------------------------------------------------------------------------------------
source("./02_Appendix/Table_S1.R")

sink()
